package edu.joe.game.premade;

import edu.joe.game.ParticleEmissionModel;
import edu.joe.game.ParticleGraphicsModel;
import edu.joe.game.ParticlePhysicsModel;

public class PresetGroup {

	public ParticleGraphicsModel graphics;
	public ParticlePhysicsModel physics;
	public ParticleEmissionModel emitter;

	public static PresetGroup makeFire() {
		PresetGroup group = new PresetGroup();
		group.graphics = new ParticleGraphicsModel();
		group.physics = new ParticlePhysicsModel();
		group.emitter = new ParticleEmissionModel();
		
		group.emitter.burstCount = 8;
		group.emitter.burstRate = 0;
		group.emitter.maxParticles = 2000;
		group.emitter.emissionType = ParticleEmissionModel.EMISSION_TYPE.BALL;
		
		group.physics.lifeMax = 1.5;
		group.physics.lifeMin = 0.0;
		group.physics.radiusMin = 0;
		group.physics.radiusMax = 1.0;
		group.physics.bounceFactor = 0.4;
		group.physics.bounceHeight = 0.1;
		group.physics.velocityDamp = 0.96;
		group.physics.velocityMin = 0;
		group.physics.velocityMax = 1;
		group.physics.gravity = 14;
		group.physics.thrustChance = 0.05;
		group.physics.thrustMin = 2;
		group.physics.thrustMax = 4;
		group.physics.minMass = 1;
		group.physics.maxMass = 50;

		group.graphics.texture = "blob.png";
		group.graphics.rS = 1;
		group.graphics.gS = 1;
		group.graphics.bS = 0.5;
		group.graphics.aS = 1;
		group.graphics.rE = 1;
		group.graphics.gE = 0.3;
		group.graphics.bE = 0;
		group.graphics.aE = 1;
		group.graphics.widthS = 2;
		group.graphics.heightS = 2;
		group.graphics.widthE = 0;
		group.graphics.heightE = 0;
		group.graphics.glow = true;
		group.graphics.billboard = true;

		return group;
	}

	public static PresetGroup makeWater() {
		PresetGroup group = new PresetGroup();
		group.graphics = new ParticleGraphicsModel();
		group.physics = new ParticlePhysicsModel();
		group.emitter = new ParticleEmissionModel();
		
		group.emitter.burstCount = 3;
		group.emitter.burstRate = 0;
		group.emitter.maxParticles = 1000;

		group.physics.lifeMax = 4.5;
		group.physics.lifeMin = 2.0;
		group.physics.radiusMin = 0.0;
		group.physics.radiusMax = 0.1;
		group.physics.bounceFactor = 0.2;
		group.physics.bounceHeight = 0.1;
		group.physics.velocityDamp = 0.99;
		group.physics.velocityMin = 0;
		group.physics.velocityMax = 2;
		group.physics.dy = 20;
		group.physics.gravity = -9.81;
		group.physics.thrustChance = 0.0;
		group.physics.thrustMin = 2;
		group.physics.thrustMax = 4;
		group.physics.exponential = false;
		group.physics.hitsFloor = true;
		group.physics.minMass = 1;
		group.physics.maxMass = 10;


		group.graphics.texture = "sprite.png";
		group.graphics.rS = 0.5;
		group.graphics.gS = 0.7;
		group.graphics.bS = 0.9;
		group.graphics.aS = 0.7;
		group.graphics.rE = 0.5;
		group.graphics.gE = 0.8;
		group.graphics.bE = 1;
		group.graphics.aE = 0;
		group.graphics.widthS = 0.5;
		group.graphics.heightS = 1;
		group.graphics.widthE = 1;
		group.graphics.heightE = 1;
		group.graphics.glow = true;
		group.graphics.billboard = true;
		return group;
	}

	public static PresetGroup makeSmoke() {
		PresetGroup group = new PresetGroup();
		group.graphics = new ParticleGraphicsModel();
		group.physics = new ParticlePhysicsModel();
		group.emitter = new ParticleEmissionModel();
		
		group.emitter.burstCount = 3;
		group.emitter.burstRate = 0;
		group.emitter.maxParticles = 1000;

		group.physics.lifeMax = 8.5;
		group.physics.lifeMin = 2.0;
		group.physics.radiusMin = 0.0;
		group.physics.radiusMax = 0.2;
		group.physics.bounceFactor = 0.2;
		group.physics.bounceHeight = 0.1;
		group.physics.velocityDamp = 0.99;
		group.physics.velocityMin = 0;
		group.physics.velocityMax = 0.9;
		group.physics.dy = 2;
		group.physics.gravity = -0.05;
		group.physics.thrustChance = 0.0;
		group.physics.thrustMin = 2;
		group.physics.thrustMax = 4;
		group.physics.exponential = false;
		group.physics.hitsFloor = true;
		group.physics.minMass = 1;
		group.physics.maxMass = 10;


		group.graphics.texture = "sprite.png";
		group.graphics.rS = 0.8;
		group.graphics.gS = 0.8;
		group.graphics.bS = 0.8;
		group.graphics.aS = 0.7;
		group.graphics.rE = 0.8;
		group.graphics.gE = 0.7;
		group.graphics.bE = 0.6;
		group.graphics.aE = 0;
		group.graphics.widthS = 0.5;
		group.graphics.heightS = 0.5;
		group.graphics.widthE = 2;
		group.graphics.heightE = 2;
		group.graphics.glow = false;
		group.graphics.billboard = true;
		return group;
	}

	public static PresetGroup makeMagic() {
		PresetGroup group = new PresetGroup();
		group.graphics = new ParticleGraphicsModel();
		group.physics = new ParticlePhysicsModel();
		group.emitter = new ParticleEmissionModel();
		
		group.emitter.burstCount = 2;
		group.emitter.burstRate = 0;
		group.emitter.maxParticles = 1000;
		group.emitter.emissionType = ParticleEmissionModel.EMISSION_TYPE.BALL;
		
		group.physics.lifeMax = 3.5;
		group.physics.lifeMin = 1.0;
		group.physics.radiusMin = 0.0;
		group.physics.radiusMax = 3.0;
		group.physics.bounceFactor = 0.99;
		group.physics.bounceHeight = 0.1;
		group.physics.velocityDamp = 0.99;
		group.physics.velocityMin = 0;
		group.physics.velocityMax = 1;
		group.physics.gravity = -10;
		group.physics.thrustChance = 0.05;
		group.physics.thrustMin = 2;
		group.physics.thrustMax = 4;
		group.physics.hitsFloor = true;
		group.physics.exponential = true;
		group.physics.minMass = 1;
		group.physics.maxMass = 10;

		group.graphics.texture = "sparkle.png";
		group.graphics.rS = 0.5;
		group.graphics.gS = 0.5;
		group.graphics.bS = 1;
		group.graphics.aS = 1;
		group.graphics.rE = 0.3;
		group.graphics.gE = 1;
		group.graphics.bE = 0.3;
		group.graphics.aE = 1;
		group.graphics.widthS = 2;
		group.graphics.heightS = 2;
		group.graphics.widthE = 0;
		group.graphics.heightE = 0;
		group.graphics.glow = true;
		group.graphics.billboard = true;
		return group;
	}

	public static PresetGroup makeSnow() {
		PresetGroup group = new PresetGroup();
		group.graphics = new ParticleGraphicsModel();
		group.physics = new ParticlePhysicsModel();
		group.emitter = new ParticleEmissionModel();
		
		group.emitter.burstCount = 2;
		group.emitter.burstRate = 0;
		group.emitter.maxParticles = 1000;
		group.emitter.emissionType = ParticleEmissionModel.EMISSION_TYPE.BALL;
		
		group.physics.lifeMax = 8.5;
		group.physics.lifeMin = 6.0;
		group.physics.radiusMin = 0.0;
		group.physics.radiusMax = 15.0;
		group.physics.bounceFactor = 0.95;
		group.physics.bounceHeight = 0.1;
		group.physics.velocityDamp = 0.92;
		group.physics.velocityMin = 0;
		group.physics.velocityMax = 0;
		group.physics.gravity = -5;
		group.physics.thrustChance = 0.05;
		group.physics.thrustMin = 0.0;
		group.physics.thrustMax = 0.2;
		group.physics.hitsFloor = true;
		group.physics.exponential = true;
		group.physics.minMass = 1;
		group.physics.maxMass = 10;

		group.graphics.texture = "sparkle.png";
		group.graphics.rS = 1;
		group.graphics.gS = 1;
		group.graphics.bS = 1;
		group.graphics.aS = 1;
		group.graphics.rE = 1;
		group.graphics.gE = 1;
		group.graphics.bE = 1;
		group.graphics.aE = 0;
		group.graphics.widthS = 0.2;
		group.graphics.heightS = 0.2;
		group.graphics.widthE = 0.2;
		group.graphics.heightE = 0.2;
		group.graphics.glow = false;
		group.graphics.billboard = true;
		return group;
	}

	public static PresetGroup makeGalaxy() {
		PresetGroup group = new PresetGroup();
		group.graphics = new ParticleGraphicsModel();
		group.physics = new ParticlePhysicsModel();
		group.emitter = new ParticleEmissionModel();
		
		group.emitter.burstCount = 1000;
		group.emitter.burstRate = 0;
		group.emitter.maxParticles = 1000;
		group.emitter.emissionType = ParticleEmissionModel.EMISSION_TYPE.BALL;
		
		group.physics.lifeMax = 99999;
		group.physics.lifeMin = 99999;
		group.physics.radiusMin = 0.1;
		group.physics.radiusMax = 0.1;
		group.physics.bounceFactor = 0.95;
		group.physics.bounceHeight = 0.1;
		group.physics.velocityDamp = 0.999;
		group.physics.velocityMin = 5;
		group.physics.velocityMax = 10;
		group.physics.gravity = 0;
		group.physics.thrustChance = 0.05;
		group.physics.thrustMin = 0.0;
		group.physics.thrustMax = 0.2;
		group.physics.hitsFloor = false;
		group.physics.exponential = true;
		group.physics.minMass = 0.1;
		group.physics.maxMass = 1;

		group.graphics.texture = "sprite.png";
		group.graphics.rS = 1;
		group.graphics.gS = 1;
		group.graphics.bS = 1;
		group.graphics.aS = 1;
		group.graphics.rE = 1;
		group.graphics.gE = 1;
		group.graphics.bE = 1;
		group.graphics.aE = 0;
		group.graphics.widthS = 0.2;
		group.graphics.heightS = 0.2;
		group.graphics.widthE = 0.2;
		group.graphics.heightE = 0.2;
		group.graphics.glow = true;
		group.graphics.billboard = true;
		return group;
	}
}
